Skip to content

Potential fix for code scanning alert no. 5: Use of externally-controlled format string#3

Draft
marceloceccon wants to merge 1 commit intomainfrom
alert-autofix-5
Draft

Potential fix for code scanning alert no. 5: Use of externally-controlled format string#3
marceloceccon wants to merge 1 commit intomainfrom
alert-autofix-5

Conversation

@marceloceccon
Copy link
Copy Markdown
Member

Potential fix for https://github.com/entropyvortex/roundtable/security/code-scanning/5

Use a static format string as the first argument to console.error, and pass untrusted/dynamic values as additional arguments.
This preserves behavior while preventing % sequences in providerName/modelId from being interpreted as format directives.

Best single fix in lib/consensus-engine.ts (the runJudge catch block around current lines 431–434):

  • Replace:
    • console.error(`[RoundTable] Judge error from ${resolved.providerName}/${resolved.modelId}:`, err);
  • With:
    • console.error("[RoundTable] Judge error from %s/%s:", resolved.providerName, resolved.modelId, err);

No functional logic changes, no new methods, no dependency additions.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…lled format string

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant